package petshop.agronunes.negocio;

import java.util.List;

import petshop.agronunes.dao.ServicoDAO;
import petshop.agronunes.entidade.Servico;


public class ServicoBLL {
	
	public Integer insert(Servico servico) throws Exception {
		try {
			return new ServicoDAO().insert(servico);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public void update(Servico servico) throws Exception {
		try {
			new ServicoDAO().update(servico);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public Servico GetById(Integer id) throws Exception {
		try {
			return new ServicoDAO().GetById(id);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public void delete(Servico servico) throws Exception {
		try {
			new ServicoDAO().delete(servico);
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
	
	public List<Servico> getAll() throws Exception {
		try {
			return new ServicoDAO().getAll();
		} catch (Exception e) {
			throw new Exception(e);
		}
	}
}
